// 客户API接口
import request from '@/sheep/request';

const CustomerApi = {
  // 获取客户分页列表
  getCustomerPage: (params) => {
    return request({
      url: '/member/customer-app/page',
      method: 'GET',
      params,
    });
  },
  // 获取我的分页列表
  getMyCustomerPage: (params) => {
    return request({
      url: '/member/customer-app/get-my',
      method: 'GET',
      params,
    });
  },

  // 获取客户详情
  getCustomerDetail: (params) => {
    return request({
      url: '/member/customer-app/get',
      method: 'GET',
      params,
    });
  },

  // 添加客户
  addCustomer: (data) => {
    return request({
      url: '/member/customer-app/create',
      method: 'POST',
      data,
    });
  },

  // 更新客户
  updateCustomer: (data) => {
    return request({
      url: '/member/customer-app/update',
      method: 'PUT',
      data,
    });
  },

  // 删除客户
  deleteCustomer: (params) => {
    return request({
      url: '/member/customer-app/delete',
      method: 'DELETE',
      params,
    });
  },

  // 添加剩余产品记录
  addCustomerRecord: (data) => {
    return request({
      url: '/member/customer-app/create/record',
      method: 'POST',
      data,
    });
  },

  //获得客户剩余产品记录分页
  getCustomerRecordPage: (params) => {
    return request({
      url: '/member/customer-app/page/record',
      method: 'GET',
      params,
    });
  },

  //获得客户剩余产品记录详情
  getCustomerRecordDetail: (params) => {
    return request({
      url: '/member/customer-app/get/record',
      method: 'GET',
      params,
    });
  },

};

export default CustomerApi;

